package huanzhao.erp.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

@TableName(value = "external_account")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ExternalAccount implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 外部账号名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * 外部账号平台
     */
    @TableField(value = "platform")
    private String platform;

    /**
     * 外部账号关联的团队id
     */
    @TableField(value = "team_id")
    private Long teamId;

    /**
     * 外部账号
     */
    @TableField(value = "account")
    private String account;

    /**
     * 外部账号密码，经aes加密
     */
    @TableField(value = "password")
    private String password;

    /**
     * 外部账号所属员工id
     */
    @TableField(value = "staff_id")
    private Long staffId;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 最后修改时间
     */
    @TableField(value = "last_modified")
    private Date lastModified;

    @Serial
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}